package com.csun.cmny.provider.service;

import com.csun.cmny.provider.model.dto.watch.OldmanBindWatchReqDto;
import com.csun.cmny.provider.service.hystrix.DmcWatchOldmanFeignApiHystrix;
import com.csun.cmny.security.feign.OAuth2FeignAutoConfiguration;
import com.csun.cmny.util.wrapper.Wrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-03-13 13:55
 * @Description: the interface dmc watch oldman feign api
 */
@FeignClient(value = "cmny-provider-dmc", configuration = OAuth2FeignAutoConfiguration.class, fallback = DmcWatchOldmanFeignApiHystrix.class)
public interface DmcWatchOldmanFeignApi {

    /**
     * 查询绑定了孝心手环的老人列表
     *
     * @param oldmanBindWatchReqDto  oldman bind watch watch req dto
     * @return
     */
    @PostMapping(value = "/api/dmc/watch/queryOldmanBindWatchList")
    Wrapper<List<Integer>> queryOldmanBindWatchList(@RequestBody OldmanBindWatchReqDto oldmanBindWatchReqDto);
}
